# $Id$
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

# after a .so bump first rebuild dirmngr
# with sudo testing-x86_64-build -- -I libgcrypt-1.6.0-1-x86_64.pkg.tar.xz
# then cp /usr/lib/libgcrypt.so.11 /var/lib/archbuild/staging-x86_64/root/usr/lib/ and do staging-x86_64-build

pkgname=libgcrypt
pkgver=1.8.1
pkgrel=1
pkgdesc="General purpose cryptographic library based on the code from GnuPG"
arch=(i686 x86_64)
url="http://www.gnupg.org"
license=('LGPL')
depends=('libgpg-error')
options=('!emptydirs')
# https://www.gnupg.org/download/integrity_check.html
source=(ftp://ftp.gnupg.org/gcrypt/${pkgname}/${pkgname}-${pkgver}.tar.bz2{,.sig})
# https://gnupg.org/download/integrity_check.html
sha1sums=('dd35f00da45602afe81e01f4d60c40bbdd826fe6'
          'SKIP')
validpgpkeys=('031EC2536E580D8EA286A9F22071B08A33BD3F06' # "NIIBE Yutaka (GnuPG Release Key) <gniibe@fsij.org>"
              'D8692123C4065DEA5E0F3AB5249B39D24F25E3B6') # Werner Koch

#prepare() {
#  cd ${pkgname}-${pkgver}
#}

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr \
	--disable-static \
	--disable-padlock-support
  make
}

check() {
  cd ${pkgname}-${pkgver}
  make check
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
}
